email me at borlaj@portlandschools.org

Loading
notes previous (10/<10) submit the dump links  
 

More string exercises:

Start with the code below. Create 4 of 6 methods (or if you are a high flyer or taking the AP, you must create all 6).

  
/**
 * HWJ3 Write a description of class MoreStringMethods here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class MoreStringMethods
{
    /**
    * will find the length of a given word.  
	* then it will print:  The word ______ has ___ characters. Obviously filling in blank with the approp info
    */
    public void printLength(String word)
    {
        
    }

   /* will take in a name [and if that name was jeff] and then say
   * Give me a J - JEFF JEFF JEFF!!!
   * notice my capitalizations thats b/c its a cheer and cheers cheer loudly.
   */
   public void cheer (String name)
   {
      
   }
   
   /** will take in a phrase and change it to all lower case but the first letter will be caps
   * So if they put in fRankenSTEIN it would be Frankenstein
   */
   public void fixCapitilization (String phrase)
   {
      
   }   
    
    /**
    * this method takes in a string and prints
    * out the last letter of the string
	* like if they put in apple as word it would print out
	* The last letter of apple is e
    */
    public void findLast(String word)
    {
           
    }

  /**
    * This method will takes in a string and puts a "-" after the 3rd character
    */
    public void wordSplit(String word)
    {
           
    }
       
    /*
     * This method will take in a first and last name and a hw average and a project average and finds the grade
     * The grade is made up of 40% hw, 60% projects.  The name will be abbreviated as shown below
     * So if findGrade("Jeff", "Borland", 90, 80) would print out Student JB has a 84.0 in the class
     * The 84 is because 40%*90 + 80*.60 = 84.0
     */
    public void findGrade(String firstName, String lastName, double hw, double project)
    {
    }
}